
package com.flashextended.apps.logomaker.singleton
{
	import flash.display.Loader;
	
	public class AppLocales
	{
		private static var locales:AppLocales;
		
		/**
		 * also could be DESKTOP
		 * set the application type before compile
		 * current working implementation is WEB
		 */ 
		public static const APPLICATION_TYPE:String = "WEB";
		
		public function AppLocales()
		{
		}
		
		public static function getInstance():AppLocales
		{
			if(locales==null)
			{
				locales = new AppLocales();
			}
			return locales;
		}
		
		private var serverURL:String;
		/**
		 * Setter & Getter for the server URL
		 */ 
		public function set mainDomain(val:String):void
		{
			serverURL = val;
		}
		/**
		 * Setter & Getter for the server URL
		 */ 		
		public function get mainDomain():String
		{
			return serverURL;
		}
		
		private var feedObj:Object;
		/**
		 * Setter & Getter for the external locales as language/ URL's and others
		 */ 
		public function set data(val:Object):void
		{
			feedObj = val;
		}
		public function get data():Object
		{
			return feedObj;
		}
		
		
		private var symbolsReferences:Object;
		/**
		 * Setter and Getter for symbols references resources
		 */ 
		public function set sybmolsResources(val:Object):void
		{
			symbolsReferences = val;
		}
		public function get sybmolsResources():Object
		{
			return symbolsReferences;
		}
		
		private var _logo:Loader;
		/**
		 * Setter and Getter for symbols references resources
		 */ 
		public function set logo(val:Loader):void
		{
			_logo = val;
		}
		public function get logo():Loader
		{
			return _logo;
		}
		/**
		 * is used to construct the first logo when the application starts
		 */ 
		public static var firstRun:Boolean=true;
		
		public function buildLocales():Object
		{
			var locales:Array = new Array();
			locales['info']="About LogoMaker";
			locales['newProject']="New project";
			locales['openProject']="Open project";
			locales['saveProject']="Save project";
			locales['addText']="Add text";
			locales['addImage']="Add image";
			locales['addSymbol']="Add symbol";
			locales['saveLogo']="Save logo";
			locales['previewLogo']="Preview logo";
			locales['doubleClickText']="Double click to edit text";
			locales['textProp']="Text properties";
			locales['imageProp']="Image properties";
			locales['symbolProp']="Symbol properties";
			locales['previewLogo']="Preview logo";
			
			locales['initialTextToTextObject']="Double click to edit text";
			locales['selectSymbolTooltip'] = "Double click to add symbol";
			
			locales['moveObjectUp']="Move object up";
			locales['moveObjectDown']="Move object down";
			locales['deleteObject']="Delete selected object";
			locales['infoDelete'] = "Do you really want to delete the selected object?";
			locales['infoNewProject'] = "Do you really want to start a new project? The current project will be lost.";
			locales['infoLoadProject'] = "Do you really want to load a new project? The current project will be lost.";
			locales['symbolColor'] = "Set symbol color";
			locales['textColor'] = "Set text color";
			locales['chooseFont'] = "Choose font";
			locales['fontSize'] = "Font size";
			locales['fontBold'] = "Is bold";
			locales['fontItalic'] = "Is italic";
			locales['fontUnderline'] = "Is underline";
			locales['brightness'] = "Brightness";
			locales['contrast'] = "Contrast";
			locales['saturation'] = "Saturation";
			locales['alert'] = "Alert";
			locales['infoWindow'] = "Info";
			locales['applicationInfo'] = '<b>LOGO MAKER DESKTOP</b><br><br>Author: <A HREF="http://activeden.net/user/jayc" TARGET="_blank">http://activeden.net/user/jayc</A><br><br>For support, installation issues contact support@flashextended.com';
			locales['copyrightBottom'] = "2010 flashextended.com";
			locales['errorPreview'] = "You must add at least one graphic object.";
			locales['errorSaveProject'] = "You need yo add at least one element to stage.";
			
			var data:Object = new Object();
			data.locales = locales;
			return data;
		}		

	}
}